<?php slot('sub', $sub); ?>

<div class="center">
    <div id="center_conteiner" class="clearfix">
        <div class="center_sub_conteiner">

            <div class="center_block">
                <div class="header_center_block">
                    <span>Rooms in <?php echo $hotel->getNameEn() ?></span>
                    <div class="back_button"><a href="<?php echo url_for('ahotels'); ?>">Back</a></div>
                </div>

                <div class="pages_list">
                    <ul>
                        <li><<</li>
                        <li class='active'>1</li>
                        <li>>></li>
                    </ul>
                </div>

                <div class="users_title">
                    <div class="users_title_id">id</div>
                    <div class="users_title_title">name</div>
                    <div class="users_title_first_name">hotel name</div>
                    <div class="users_title_status">adult</div>
                    <div class="users_title_permissions">children</div>
                    <div class="add_new_user"><a href="<?php echo url_for('addroom', array('hotel_id' => $hotel->getId())); ?>">Add</a></div>
                </div>

                <?php
                foreach ($rooms as $r) {
                    echo '<div class="user_line">' .
                    '<div class="user_line_id">' . $r->getId() . '</div>' .
                    '<div class="user_line_title">' . $r->getName() . '</div>' .
                    '<div class="user_line_name">' . $r['HotelRooms']->getNameEn() . '</div>' .
                    '<div class="user_line_status">' . $r->getAdult() . '</div>' .
                    '<div class="user_line_permissions">' . $r->getChildren() . '</div>' .
                    '<div class="hotel_admin_line_room_button"><a href="' . url_for('aprice', array('hotel_id' => $hotel->getId(), 'room_id' => $r->getId())) . '">Price</a></div>' .
                    '<div class="user_line_edit_button"><a href="' . url_for('editroom', array('room_id' => $r->getId())) . '">Edit</a></div>' .
                    '<div class="user_line_delete_button"><a href="' . url_for('deleteroom', array('room_id' => $r->getId(), 'hotel_id' => $hotel->getId())) . '">' . 'Delete' . '</a></div>' .
                    '</div>';
                }
                ?>

                <div class="pages_list">
                    <ul>
                        <li><<</li>
                        <li class='active'>1</li>
                        <li>>></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
